Multiprotocol label switching (MPLS) is a data-carrying mechanism that directs data from one network node to a next network node based on path labels instead of network addresses, avoiding complex lookups in a routing table. The path labels identify virtual links or paths between distant nodes, rather than endpoints. MPLS may be used to carry different kinds of traffic, including Internet protocol (IP) packets, asynchronous transfer mode (ATM) frames, synchronous optical networking (SONET) frames, and Ethernet frames. A constrained shortest path first (CSPF) algorithm is an advanced version of a shortest path algorithm used in open shortest path first (OSPF) and intermediate system to intermediate system (ISIS) route computations. CSPF is used in computing a shortest path for a label-switched path (LSP) based upon multiple constraints. The CSPF algorithm considers a topology of a network, attributes of the LSP, and links in computing a path for the LSP.